/**
 * @file InterruptAndRecoveryCom.h
 * @author  
 * @brief 
 * @version 1.0
 * @date 2021-04-26
 * 
 * @copyright Copyright (c) 2021
 * 
 */
#pragma once

#include "rclcpp/rclcpp.hpp"
#include "rclcpp_action/rclcpp_action.hpp"
#include "nav2_msgs/action/navigate_to_pose.hpp"
#include "geometry_msgs/msg/pose_stamped.hpp"
#include "nav2_msgs/srv/wait_and_insert_pose.hpp"

namespace behavior_controller
{

    class WaitAndInsertPose
    {
        public :
            WaitAndInsertPose() {;};
            void SetNode(const rclcpp::Node::SharedPtr &ros_node);
            bool async_send_request(std::string name ,double length,bool start,geometry_msgs::msg::PoseStamped pose=geometry_msgs::msg::PoseStamped());

        public:    
            rclcpp::Node::SharedPtr ros_node_=nullptr;
            rclcpp::Client<nav2_msgs::srv::WaitAndInsertPose>::SharedPtr client_;
            rclcpp::Client<nav2_msgs::srv::WaitAndInsertPose>::SharedPtr client_nav;
            //rclcpp::Publisher<geometry_msgs::msg::PoseStamped>::SharedPtr pose_pub_=nullptr;
            //geometry_msgs::msg::PoseStamped  goal_pose;
    };
    //static 
    extern WaitAndInsertPose insert_pose_client; //实例化类






}